package cn.lixin.basic.query;

import lombok.Data;

@Data
public class BaseQuery {
    private Integer currentPage=1;
    private Integer pageSize=10;
    private String keyword="";

    /** 分页下标 ： limit第一个参数*/
    public Integer getIndex(){

        return (this.currentPage-1)*this.pageSize;
    }

    public BaseQuery(Integer currentPage, Integer pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public BaseQuery() {
    }
}
